package com.xbongbong.pro.domain.dao;

import com.xbongbong.pro.domain.entity.CloudCodeControlEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface CloudCodeControlDao {
    Long insert(CloudCodeControlEntity entity);

    void insertBatch(List<CloudCodeControlEntity> list);

    CloudCodeControlEntity getByKey(@Param("key") Long key, @Param("corpid") String corpid);
    CloudCodeControlEntity getByCcId(@Param("ccId") Long ccId, @Param("corpid") String corpid);

    Long update(CloudCodeControlEntity entity);

    List<CloudCodeControlEntity> findEntities(@Param("param") Map<String, Object> param);

    Integer getEntitiesCount(@Param("param") Map<String, Object> param);

    Long deleteByKey(@Param("key") Long key, @Param("corpid") String corpid);

    Long deleteByCcId(@Param("corpid") String corpid, @Param("ccId") Long ccId);
}